package com.dbappsecurity.core.utils;


import io.reactivex.*;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by Arirus on 2018/5/14.
 */

public class RxUtils {

    private RxUtils() {
    }

    public static <T> ObservableTransformer<T, T> rxObservableSchedulerHelper() {
        return tObservable -> tObservable.subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }

    public static <T> SingleTransformer<T, T> rxSingleSchedulerHelper() {
        return tObservable -> tObservable.subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }


}
